//
//  ZHTJFaceService.h
//  ZHTJDevDemo
//
//  Created by thinkjoy on 2016/11/16.
//  Copyright © 2016年 杜瑞胜. All rights reserved.
//  人脸相关操作

#import <UIKit/UIKit.h>

#import "ZHTJFaceError.h"

#import "ZHTJFaceSetModel.h"


@interface ZHTJFaceManager : NSObject

#pragma mark    为已创建的faceSet添加FaceID
/**
 通过faceSetName添加faceID

 @param faceIDAry FaceID数组,有效且不在faceSet中的FaceID
 @param faceSetName 已存在faceSet的名称
 @param completionHandler 回调
 */
+ (void)tj_FaceSetAddFaceIDs:(NSArray *)faceIDAry faceSetName:(NSString *)faceSetName completionHandler:(void (^)(ZHTJFaceOperationModel * faceOperationMD, ZHTJFaceError *  error))completionHandler;

/**
 通过faceSetID添加faceID
 
 @param faceIDAry FaceID数组,有效且不在faceSet中的FaceID
 @param faceSetID 已存在faceSet的ID
 @param completionHandler 回调
 */
+ (void)tj_FaceSetAddFaceIDs:(NSArray *)faceIDAry faceSetID:(NSString *)faceSetID completionHandler:(void (^)(ZHTJFaceOperationModel * faceOperationMD, ZHTJFaceError *  error))completionHandler;

/**
 通过faceSetID和Img添加faceID

 @param img 分辨率在1920*1920以内，且有且只有1张人脸在图片上
 @param faceParam face的标签信息
 @param faceSetID 已存在faceSet的ID
 @param completionHandler 回调
 */
+ (void)tj_FaceSetAddFaceIDWithImg:(UIImage *)img faceParam:(NSString *)faceParam faceSetID:(NSString *)faceSetID completionHandler:(void (^)(ZHTJFaceOperationModel * faceOperationMD, ZHTJFaceError *  error))completionHandler;

/**
 通过faceSetName和Img添加faceID
 
 @param img 分辨率在1920*1920以内，且有且只有1张人脸在图片上
 @param faceParam face的标签信息
 @param faceSetName 已存在faceSet的名称
 @param completionHandler 回调
 */
+ (void)tj_FaceSetAddFaceIDWithImg:(UIImage *)img faceParam:(NSString *)faceParam faceSetName:(NSString *)faceSetName completionHandler:(void (^)(ZHTJFaceOperationModel * faceOperationMD, ZHTJFaceError *  error))completionHandler;
#pragma mark    为已创建的faceSet删除FaceID
/**
 通过faceSetName删除faceID

 @param faceIDAry FaceID数组,有效且存在faceSet中的FaceID
 @param faceSetName 已存在faceSet的名称
 @param completionHandler 回调
 */
+ (void)tj_FaceSetRemoveFaceIDs:(NSArray *)faceIDAry faceSetName:(NSString *)faceSetName completionHandler:(void (^)(ZHTJFaceOperationModel * faceOperationMD, ZHTJFaceError *  error))completionHandler;

/**
 通过faceSetID删除faceID
 
 @param faceIDAry FaceID数组,有效且存在faceSet中的FaceID
 @param faceSetID 已存在faceSet的ID
 @param completionHandler 回调
 */
+ (void)tj_FaceSetRemoveFaceIDs:(NSArray *)faceIDAry faceSetID:(NSString *)faceSetID completionHandler:(void (^)(ZHTJFaceOperationModel * faceOperationMD, ZHTJFaceError *  error))completionHandler;

#pragma mark    获取人脸的关联(详细)信息
/**
 获取一个人脸的关联(详细)信息

 @param faceIDAry faceID数组,有效的faceID
 @param isGet 是否获取人脸图片地址;默认为NO;
 @param completionHandler 回调
 */
+ (void)tj_FaceReadFaceDetailWithFaceIDs:(NSArray *)faceIDAry getFaceUrl:(BOOL)isGet completionHandler:(void (^)(NSArray<ZHTJFaceDetailModel*>* faceDetailMDAry, ZHTJFaceError *  error))completionHandler;

#pragma mark    给人脸设置标示信息
/**
 给人脸设置标示信息

 @param faceID 有效的FaceID
 @param faceUserParam face的标记信息
 @param faceTag face的标记信息
 @param completionHandler 回调
 */
+ (void)tj_FaceMarkWithFaceID:(NSString *)faceID faceUserParam:(NSString *)faceUserParam faceTag:(NSString *)faceTag  completionHandler:(void (^)(ZHTJFaceModel * faceMD, ZHTJFaceError *  error))completionHandler;

#pragma mark    分析人脸特征
/**
 分析人脸特征

 @param faceIDAry faceID数组,有效的faceID
 @param completionHandler 回调
 */
+ (void)tj_FaceAnalyzeWithFaceIDs:(NSArray *)faceIDAry completionHandler:(void (^)(NSArray <ZHTJFaceFeaturesModel *>* faceFeaturesMDAry, ZHTJFaceError *  error))completionHandler;

#pragma mark    根据faceParam获得faceSet中的face
/**
 根据FaceSetName获取faceSet中的face

 @param faceUserParam face的标记信息,默认为空,查询得到所有的人脸;
 @param faceSetName faceSet的名称
 @param completionHandler 回调
 */
+ (void)tj_FaceQueryFacesWithFaceUserParam:(NSString *)faceUserParam faceSetName:(NSString *)faceSetName completionHandler:(void (^)(NSArray <NSString *>* faceIDAry, ZHTJFaceError *  error))completionHandler;

/**
 根据FaceSetID获取faceSet中的face
 
 @param faceUserParam face的标记信息,默认为空,查询得到所有的人脸;
 @param faceSetID faceSet的ID
 @param completionHandler 回调
 */
+ (void)tj_FaceQueryFacesWithFaceUserParam:(NSString *)faceUserParam faceSetID:(NSString *)faceSetID completionHandler:(void (^)(NSArray <NSString *>* faceIDAry, ZHTJFaceError *  error))completionHandler;



@end
